﻿using System;
using ZilLion.Core.ConfigManager.Attribute;
using ZilLion.Core.ConfigManager.Provider;

namespace ZilLion.TaskManager.Entity.Config
{
    /// <summary>
    ///     作业调度平台配置
    /// </summary>
    [Serializable]
    [ConfigurationArgument(typeof(TaskManagerCommonConfig), typeof(JsonConfigProvider))]
    public class TaskManagerCommonConfig
    {
      
        /// <summary>
        /// windows服务的说明
        /// </summary>
        public string ServiceDescription { get; set; }
        /// <summary>
        /// windos服务的名称
        /// </summary>
        public string ServiceDisplayName { get; set; }
      
        /// <summary>
        /// 任务运行时
        /// </summary>
        public TaskRuntimeType TaskRuntimeType { get; set; }

        /// <summary>
        /// 客户端编号 todo 安装程序写注册表?
        /// </summary>
        public string ClientNo { get; set; }

     /// <summary>
     /// 是否开启跟踪模式
     /// </summary>
        public bool Traceable { get; set; }

    }

    /// <summary>
    ///     任务运行时
    /// </summary>
    public enum TaskRuntimeType
    {
        /// <summary>
        ///     运行在EXE 进程中
        /// </summary>
        Exe = 1,

        /// <summary>
        ///     运行在appdomain中
        /// </summary>
        Appdomain = 0
    }
}